package com.Reactor3参考文档;

import java.util.Arrays;
import java.util.List;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class Flux或Mono {

	public static void main(String[] args) {
		Flux<String> seq1 = Flux.just("foo", "bar", "foobar");

		List<String> iterable = Arrays.asList("foo", "bar", "foobar");
		Flux<String> seq2 = Flux.fromIterable(iterable);
		// 注意，即使没有值，工厂方法仍然采用通用的返回类型。
		Mono<String> noData = Mono.empty();

		Mono<String> data = Mono.just("foo");
		// 第一个参数是 range 的开始，第二个参数是要生成的元素个数。
		Flux<Integer> numbersFromFiveToSeven = Flux.range(5, 3);
	}

}
